<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/context/mytags.jsp"%>
<!DOCTYPE html >
<html>
<head>
<title>角色集合</title>
<t:base type="jquery,easyui,tools"></t:base>
</head>
<body style="overflow-y: hidden" scroll="no">
<t:datagrid name="roleList" title="common.role.select" actionUrl="userController.do?datagridRole" idField="id" checkbox="true" showRefresh="false" pagination="false" queryMode="group">
	<t:dgCol title="common.id" field="id" hidden="true"></t:dgCol>
	<t:dgCol title="common.role.name" field="roleName" query="true" queryMode="single" width="50"></t:dgCol>
</t:datagrid>
</body>

<script type="text/javascript">
$(function(){
	$("#roleList").datagrid({
		onLoadSuccess : function(){
			var roleIds = $("#roleid",top.myWindow.document).val();
			if(roleIds != undefined){
				$(roleIds.split(",")).each(function(i,id){
					$($("#roleList").datagrid("getRows")).each(function(j,rowData){
						if(rowData.id == id){
							$("#roleList").datagrid("selectRow",j);
						}
					});
				});
			}
			
		}
	});
	
});
</script>
</html>
